3.1.70 \(\int \frac {\sec (c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [70]

Optimal. Leaf size=60 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{4 a^2 d}-\frac {1}{4 d (a+a \sin (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \sin (c+d x)\right )} \]

[Out]

1/4*arctanh(sin(d*x+c))/a^2/d-1/4/d/(a+a*sin(d*x+c))^2-1/4/d/(a^2+a^2*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2746, 46, 212} \begin {gather*} -\frac {1}{4 d \left (a^2 \sin (c+d x)+a^2\right )}+\frac {\tanh ^{-1}(\sin (c+d x))}{4 a^2 d}-\frac {1}{4 d (a \sin (c+d x)+a)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(a + a*Sin[c + d*x])^2,x]

[Out]

ArcTanh[Sin[c + d*x]]/(4*a^2*d) - 1/(4*d*(a + a*Sin[c + d*x])^2) - 1/(4*d*(a^2 + a^2*Sin[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {a \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^3} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a \text {Subst}\left (\int \left (\frac {1}{2 a (a+x)^3}+\frac {1}{4 a^2 (a+x)^2}+\frac {1}{4 a^2 \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {1}{4 d (a+a \sin (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \sin (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{4 a d}\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{4 a^2 d}-\frac {1}{4 d (a+a \sin (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 38, normalized size = 0.63 \begin {gather*} \frac {\tanh ^{-1}(\sin (c+d x))-\frac {2+\sin (c+d x)}{(1+\sin (c+d x))^2}}{4 a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(a + a*Sin[c + d*x])^2,x]

[Out]

(ArcTanh[Sin[c + d*x]] - (2 + Sin[c + d*x])/(1 + Sin[c + d*x])^2)/(4*a^2*d)

________________________________________________________________________________________

Maple [A]
time = 0.21, size = 55, normalized size = 0.92

method result size
derivativedivides \(\frac {-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{8}-\frac {1}{4 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{4 \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{8}}{d \,a^{2}}\) \(55\)
default \(\frac {-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{8}-\frac {1}{4 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{4 \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{8}}{d \,a^{2}}\) \(55\)
risch \(-\frac {i \left (4 i {\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{2 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{4}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{4 a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{4 a^{2} d}\) \(100\)
norman \(\frac {\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}+\frac {3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d a}}{a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 a^{2} d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 a^{2} d}\) \(115\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(-1/8*ln(sin(d*x+c)-1)-1/4/(1+sin(d*x+c))^2-1/4/(1+sin(d*x+c))+1/8*ln(1+sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 72, normalized size = 1.20 \begin {gather*} -\frac {\frac {2 \, {\left (\sin \left (d x + c\right ) + 2\right )}}{a^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) + a^{2}} - \frac {\log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {\log \left (\sin \left (d x + c\right ) - 1\right )}{a^{2}}}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/8*(2*(sin(d*x + c) + 2)/(a^2*sin(d*x + c)^2 + 2*a^2*sin(d*x + c) + a^2) - log(sin(d*x + c) + 1)/a^2 + log(s
in(d*x + c) - 1)/a^2)/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 105, normalized size = 1.75 \begin {gather*} \frac {{\left (\cos \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) - 2\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (\cos \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) - 2\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, \sin \left (d x + c\right ) + 4}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - 2 \, a^{2} d \sin \left (d x + c\right ) - 2 \, a^{2} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/8*((cos(d*x + c)^2 - 2*sin(d*x + c) - 2)*log(sin(d*x + c) + 1) - (cos(d*x + c)^2 - 2*sin(d*x + c) - 2)*log(-
sin(d*x + c) + 1) + 2*sin(d*x + c) + 4)/(a^2*d*cos(d*x + c)^2 - 2*a^2*d*sin(d*x + c) - 2*a^2*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))**2,x)

[Out]

Integral(sec(c + d*x)/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x)/a**2

________________________________________________________________________________________

Giac [A]
time = 6.30, size = 71, normalized size = 1.18 \begin {gather*} \frac {\frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{2}} - \frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{2}} - \frac {3 \, \sin \left (d x + c\right )^{2} + 10 \, \sin \left (d x + c\right ) + 11}{a^{2} {\left (\sin \left (d x + c\right ) + 1\right )}^{2}}}{16 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/16*(2*log(abs(sin(d*x + c) + 1))/a^2 - 2*log(abs(sin(d*x + c) - 1))/a^2 - (3*sin(d*x + c)^2 + 10*sin(d*x + c
) + 11)/(a^2*(sin(d*x + c) + 1)^2))/d

________________________________________________________________________________________

Mupad [B]
time = 4.52, size = 60, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )}{4\,a^2\,d}-\frac {\frac {\sin \left (c+d\,x\right )}{4}+\frac {1}{2}}{d\,\left (a^2\,{\sin \left (c+d\,x\right )}^2+2\,a^2\,\sin \left (c+d\,x\right )+a^2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)*(a + a*sin(c + d*x))^2),x)

[Out]

atanh(sin(c + d*x))/(4*a^2*d) - (sin(c + d*x)/4 + 1/2)/(d*(2*a^2*sin(c + d*x) + a^2 + a^2*sin(c + d*x)^2))

________________________________________________________________________________________